﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="guanlihelp.aspx.cs" Inherits="guanlihelp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> 管理求助</title>
<link rel="stylesheet" type="text/css" href="wuliu.css">
        <style type="text/css">
            #main
            {
                height: 495px;
            }
        </style>
</head>

<body>
<form id="form2" runat="server" >
<div id="container">
	<div id="top">
    	<div id="header"></div>
        <div id="menu">
        	<ul>
            	<li><a href="index.aspx" >首页</a></li>
                <li><a href="guanliuser.aspx">管理用户</a></li>
                <li><a href="guanlibook.aspx">管理书刊</a></li>
                <li><a href="guanlielc.aspx">管理电器</a></li>
                <li><a href="guanliteach.aspx">管理服务</a></li>
               
            </ul>
        </div>
    </div>	
    <div id="content">
      <div id="main" >
	      
	   
          <asp:ListView ID="ListView1" runat="server" DataKeyNames="help_id" 
              DataSourceID="SqlDataSource1" InsertItemPosition="LastItem">
              
              <AlternatingItemTemplate>
                  <tr style="">
                      <td>
                          <asp:Button ID="DeleteButton" runat="server" CommandName="Delete" Text="删除" />
                          <asp:Button ID="EditButton" runat="server" CommandName="Edit" Text="编辑" />
                      </td>
                      <td>
                          <asp:Label ID="user_idLabel" runat="server" Text='<%# Eval("user_id") %>' />
                      </td>
                      <td>
                          <asp:Label ID="user_datepbLabel" runat="server" 
                              Text='<%# Eval("user_datepb") %>' />
                      </td>
                      <td>
                          <asp:Label ID="user_pbmsgLabel" runat="server" 
                              Text='<%# Eval("user_pbmsg") %>' />
                      </td>
                      <td>
                          <asp:Label ID="help_idLabel" runat="server" Text='<%# Eval("help_id") %>' />
                      </td>
                  </tr>
              </AlternatingItemTemplate>
              <LayoutTemplate>
                  <table runat="server">
                      <tr runat="server">
                          <td runat="server">
                              <table ID="itemPlaceholderContainer" runat="server" border="0" style="">
                                  <tr runat="server" style="">
                                      <th runat="server">
                                      </th>
                                      <th runat="server">
                                          用户ID</th>
                                      <th runat="server">
                                          发布日期</th>
                                      <th runat="server">
                                          标题</th>
                                      <th runat="server">
                                          产品ID</th>
                                  </tr>
                                  <tr ID="itemPlaceholder" runat="server">
                                  </tr>
                              </table>
                          </td>
                      </tr>
                      <tr runat="server">
                          <td runat="server" style="">
                              <asp:DataPager ID="DataPager1" runat="server">
                                  <Fields>
                                      <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" 
                                          ShowLastPageButton="True" />
                                  </Fields>
                              </asp:DataPager>
                          </td>
                      </tr>
                  </table>
              </LayoutTemplate>
              <InsertItemTemplate>
                  <tr style="">
                      <td>
                          <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="插入" />
                          <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="清除" />
                      </td>
                      <td>
                          <asp:TextBox ID="user_idTextBox" runat="server" Text='<%# Bind("user_id") %>' />
                      </td>
                      <td>
                          <asp:TextBox ID="user_datepbTextBox" runat="server" 
                              Text='<%# Bind("user_datepb") %>' />
                      </td>
                      <td>
                          <asp:TextBox ID="user_pbmsgTextBox" runat="server" 
                              Text='<%# Bind("user_pbmsg") %>' />
                      </td>
                      <td>
                          &nbsp;</td>
                  </tr>
              </InsertItemTemplate>
              <SelectedItemTemplate>
                  <tr style="">
                      <td>
                          <asp:Button ID="DeleteButton" runat="server" CommandName="Delete" Text="删除" />
                          <asp:Button ID="EditButton" runat="server" CommandName="Edit" Text="编辑" />
                      </td>
                      <td>
                          <asp:Label ID="user_idLabel" runat="server" Text='<%# Eval("user_id") %>' />
                      </td>
                      <td>
                          <asp:Label ID="user_datepbLabel" runat="server" 
                              Text='<%# Eval("user_datepb") %>' />
                      </td>
                      <td>
                          <asp:Label ID="user_pbmsgLabel" runat="server" 
                              Text='<%# Eval("user_pbmsg") %>' />
                      </td>
                      <td>
                          <asp:Label ID="help_idLabel" runat="server" Text='<%# Eval("help_id") %>' />
                      </td>
                  </tr>
              </SelectedItemTemplate>
              <EmptyDataTemplate>
                  <table runat="server" style="">
                      <tr>
                          <td>
                              未返回数据。</td>
                      </tr>
                  </table>
              </EmptyDataTemplate>
              <EditItemTemplate>
                  <tr style="">
                      <td>
                          <asp:Button ID="UpdateButton" runat="server" CommandName="Update" Text="更新" />
                          <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="取消" />
                      </td>
                      <td>
                          <asp:TextBox ID="user_idTextBox" runat="server" Text='<%# Bind("user_id") %>' />
                      </td>
                      <td>
                          <asp:TextBox ID="user_datepbTextBox" runat="server" 
                              Text='<%# Bind("user_datepb") %>' />
                      </td>
                      <td>
                          <asp:TextBox ID="user_pbmsgTextBox" runat="server" 
                              Text='<%# Bind("user_pbmsg") %>' />
                      </td>
                      <td>
                          <asp:Label ID="help_idLabel1" runat="server" Text='<%# Eval("help_id") %>' />
                      </td>
                  </tr>
              </EditItemTemplate>
              <ItemTemplate>
                  <tr style="">
                      <td>
                          <asp:Button ID="DeleteButton" runat="server" CommandName="Delete" Text="删除" />
                          <asp:Button ID="EditButton" runat="server" CommandName="Edit" Text="编辑" />
                      </td>
                      <td>
                          <asp:Label ID="user_idLabel" runat="server" Text='<%# Eval("user_id") %>' />
                      </td>
                      <td>
                          <asp:Label ID="user_datepbLabel" runat="server" 
                              Text='<%# Eval("user_datepb") %>' />
                      </td>
                      <td>
                          <asp:Label ID="user_pbmsgLabel" runat="server" 
                              Text='<%# Eval("user_pbmsg") %>' />
                      </td>
                      <td>
                          <asp:Label ID="help_idLabel" runat="server" Text='<%# Eval("help_id") %>' />
                      </td>
                      
                  </tr>
              </ItemTemplate>
          </asp:ListView>
          <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
              ConnectionString="<%$ ConnectionStrings:infoConnectionString %>" 
              DeleteCommand="DELETE FROM [b_infohelp] WHERE [help_id] = @help_id" 
              InsertCommand="INSERT INTO [b_infohelp] ([user_id], [user_datepb], [user_pbmsg]) VALUES (@user_id, @user_datepb, @user_pbmsg)" 
              SelectCommand="SELECT * FROM [b_infohelp]" 
              
              UpdateCommand="UPDATE [b_infohelp] SET [user_id] = @user_id, [user_datepb] = @user_datepb, [user_pbmsg] = @user_pbmsg WHERE [help_id] = @help_id">
              <DeleteParameters>
                  <asp:Parameter Name="help_id" Type="Int32" />
              </DeleteParameters>
              <UpdateParameters>
                  <asp:Parameter Name="user_id" Type="String" />
                  <asp:Parameter Name="user_datepb" Type="String" />
                  <asp:Parameter Name="user_pbmsg" Type="String" />
                  <asp:Parameter Name="help_id" Type="Int32" />
              </UpdateParameters>
              <InsertParameters>
                  <asp:Parameter Name="user_id" Type="String" />
                  <asp:Parameter Name="user_datepb" Type="String" />
                  <asp:Parameter Name="user_pbmsg" Type="String" />
              </InsertParameters>
          </asp:SqlDataSource>
	      
	   
      </div>
  </div>
    <div id="footer">
        版权所有 Copyright ©长江大学计算机科学学院 All Rights Reserveda href=&quot;#&quot;&gt;联系站长"#">网站地图</a>
    </div>
</div>
</form>
</body>

</html>